#include "KeyInfo.h"

namespace kryptos { namespace entities
{

KeyInfo::KeyInfo(const KeyInfo& keyinfo)
{
    m_type       = keyinfo.m_type;
    m_keyid      = keyinfo.m_keyid;
    m_name       = keyinfo.m_name;
    m_comment    = keyinfo.m_comment;
    m_email      = keyinfo.m_email;
    m_passphrase = keyinfo.m_passphrase;
    m_type       = keyinfo.m_type;
    m_size       = keyinfo.m_size;
    m_timestamp  = keyinfo.m_timestamp;
    m_isIdentity = keyinfo.m_isIdentity;
}

KeyInfo::KeyInfo(KeyType type
        , std::string name
        , std::string email
        , std::string comment
        , std::string passphrase
        , int size
        )
{
    m_type  = type;
    m_name  = name;
    m_comment = comment;
    m_email   = email;
    m_passphrase = passphrase;
    m_type = type;
    m_size = size;
    m_isIdentity = false;
}

KeyInfo::KeyInfo(KeyType type,
        std::string keyid,
        std::string name,
        std::string email,
        std::string comment,
        std::string passphrase,
        std::string timestamp,
        int size
        )
{
    m_type  = type;
    m_keyid = keyid;
    m_name  = name;
    m_comment = comment;
    m_email   = email;
    m_passphrase = passphrase;
    m_type = type;
    m_size = size;
    m_timestamp = timestamp;
    m_isIdentity = false;
}

KeyInfo::~KeyInfo()
{
}

void KeyInfo::setKeyid(std::string keyid)
{
    m_keyid = keyid;
}

void KeyInfo::setPassphrase(std::string passphrase)
{
    m_passphrase = passphrase;
}

void KeyInfo::setTimestamp(std::string timestamp)
{
    m_timestamp = timestamp;
}

void KeyInfo::setIsIdentity(bool val)
{
    m_isIdentity = val;
}

std::string KeyInfo::keyid() const
{
    return  m_keyid;
}

std::string KeyInfo::name() const
{
    return  m_name;
}
std::string KeyInfo::email() const
{
    return  m_email;
}
std::string KeyInfo::comment() const
{
    return  m_comment;
}
std::string KeyInfo::passphrase() const
{
    return  m_passphrase;
}

bool KeyInfo::isIdentity() const
{
    return m_isIdentity;
}

int KeyInfo::size() const
{
    return  m_size;
}

KeyInfo::KeyType KeyInfo::type() const
{
    return  m_type;
}

}}
